'''
Created on 2012-9-30

@author: siloonuser
'''
import ConfigParser

class AppMain(object):
    '''
    classdocs
    '''
    CFG_SALT_KEY = ''
    CFG_FILE_DIR = ''
    CFG_JAVA_CMD_PATH = ''
    def __init__(self):
        pass
    @staticmethod
    def loadCfgData():
        config = ConfigParser.ConfigParser()
        config.readfp(open("app.ini","rb"))
        AppMain.CFG_FILE_DIR = config.get('global', 'file_dir')
        AppMain.CFG_JAVA_CMD_PATH = config.get('global', 'java_cmd_path')
        pass
    @staticmethod
    def saveCfgData():
        config = ConfigParser.ConfigParser()
        config.readfp(open("app.ini","rb"))
        config.set('global', 'file_dir', AppMain.CFG_FILE_DIR)
        config.set('global', 'java_cmd_path', AppMain.CFG_JAVA_CMD_PATH)
        config.write(open("app.ini", "w"))
        pass
        